package club.ruanx.spider.service.impl;

import club.ruanx.spider.entity.SpiderLog;
import club.ruanx.spider.repository.SpiderLogRepository;
import club.ruanx.spider.service.SpiderLogService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 阮胜
 * @date 2018/11/26 15:04
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class SpiderLogServiceImpl implements SpiderLogService {

    private final SpiderLogRepository spiderLogRepository;

    public SpiderLogServiceImpl(SpiderLogRepository spiderLogRepository) {
        this.spiderLogRepository = spiderLogRepository;
    }

    @Override
    public SpiderLog save(SpiderLog spiderLog) {
        return spiderLogRepository.save(spiderLog);
    }
}
